package com.example.bootdemo.service;

import com.example.bootdemo.pojo.UserInfo;
import com.example.bootdemo.pojo.UserParam;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;

import java.util.Date;
import java.util.List;

public interface UserService {

    UserInfo save(UserInfo userInfo);

    List<UserInfo> saveAll(List<UserInfo> users);

    UserInfo queryById(Long userId);

    UserInfo queryByUserName(String userName);

    UserInfo findByTelNum(Long telNum);

    UserInfo findByEmail(String email);

    List<UserInfo> queryByLikeUserName(String userName);

    List<UserInfo> queryLikeByUserNameCn(String userNameCn);

    List<UserInfo> findAllOrderBy(String propName,String order);

    Page<UserInfo> findAllByPage(int page, int pageSize);

    List<UserInfo> findByUserRole(String userRole);

    List<UserInfo> findByLikeUserName(String userName);

    UserInfo queryByEmail(String email);

    List<UserInfo> findByUserNameOrderBy(String userName,String orderBy);

    Integer updateEmailByUsername(String username,String email);

    UserInfo findOneByExample(UserInfo userInfo);

    List<UserInfo> findAllByExample(UserInfo userInfo);

    List<UserInfo> findAllByDynamicConditions(UserParam userParam);

    List<UserInfo> findAllByContainsLike(String attribute,String value);

    List<UserInfo> findAllByContainsLikeAndBetween(String attribute, String value, Date min, Date max);



}
